<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="batFeeId" name="batFeeId" th:value="${scBatFee.batFeeId}"  type="hidden">
														<div class="form-group">
								<label class="col-sm-3 control-label">班组：</label>
								<div class="col-sm-8">
									<select id="marshalling" name="marshallingId"  class="form-control">

									</select>
								</div>
							</div>
							<!--<div class="form-group">-->
								<!--<label class="col-sm-3 control-label">原料进库：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<select id="purchaseId" name="purchaseId" class="form-control" >-->

									<!--</select>-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">投料数量：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="number" name="number" th:value="${scBatFee.number}" class="form-control" type="number">-->
								<!--</div>-->
							<!--</div>-->
							<div class="form-group">
								<label class="col-sm-3 control-label">
									配料&投料：
									<span style="color: #e7262a">*</span>
								</label>
								<div class="col-sm-8 product-list">
									<div>
										<a class="btn btn-primary" option="materialSelect">
											<i class="fa fa-plus"></i>
											<span>添加原材料</span>
										</a>
									</div>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">水温：</label>
								<div class="col-sm-8">
									<input id="temperature" name="temperature" th:value="${scBatFee.temperature}" class="form-control" type="number" placeholder="非必填项">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">配料水重量：</label>
								<div class="col-sm-8">
									<input id="waterWeight" name="waterWeight" th:value="${scBatFee.waterWeight}" class="form-control" type="number" placeholder="非必填项">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">出料温度：</label>
								<div class="col-sm-8">
									<input id="outTemperature" name="outTemperature" th:value="${scBatFee.outTemperature}" class="form-control" type="number" placeholder="非必填项">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">负责人：</label>
								<div class="col-sm-8">
									<input id="leadingOfficial" name="leadingOfficial" th:value="${scBatFee.leadingOfficial}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">投料时间：</label>
								<div class="col-sm-8">
									<input id="feedingDate" name="feedingDate" th:value="${scBatFee.feedingDate}" class="form-control" type="date">
								</div>
							</div>
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="createDate" name="createDate" th:value="${scBatFee.createDate}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-3 control-label">：</label>-->
								<!--<div class="col-sm-8">-->
									<!--<input id="createBy" name="createBy" th:value="${scBatFee.createBy}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" th:inline="javascript">
        function getMarshallingId() {
            var typeId = [[${scBatFee.marshallingId}]]
            return typeId;
        }
		function formatDate() {
			var useDate = [[${scBatFee.feedingDate}]];
			useDate = useDate.substring(0,10)
			$("#feedingDate").val(useDate)
		}
		function getPurchaseId() {
			var typeId = [[${scBatFee.purchaseId}]]
			return typeId;
		}
		function addMaterialslist() {
			var materials= [[${scBatFee.materials}]]
			for (var index in materials){
				var material = materials[index];
				var div = $('<div id="' + material.materialId + '" class="product-group"></div>');
				$(div).append('<span>' + material.materialName + '</span>');
				$(div).append('<input id="' + material.materialId + '" class="form-control" name="batch" value="' + material.batch + '" type="" required placeholder="原材料批次(必填)">');
				$(div).append('<input id="' + material.materialId + '" class="form-control" name="number" value="' + material.batchingSize + '" type="" required placeholder="配料数量(必填)">');
				$(div).append('<input id="' + material.materialId + '" class="form-control" name="number2" value="' + material.feedingSize + '" type="" required placeholder="投料数量(必填)">');
				$(div).append('<i class="fa fa-remove" option="materialDelete"></i>');
				$(".product-list").append(div);
			}
		}
	</script>
	<script type="text/javascript" th:src="@{/js/appjs/produce/scBatFee/edit.js}" src="/js/appjs/produce/scBatFee/edit.js">
	</script>
</body>
</html>
